import java.util.Scanner;
import java.util.Random;
public class Main {
    public static int add(int x, int y) {
        return x+y;
    }

    public static double add(double x, double y) {
        return x+y;
    }
    public static void main(String[] args) {
        int a = 10;
        int b = 20;
        int ret = add(a,b);
        System.out.println(ret);
        System.out.println();
    }
    public static void main14(String[] args) {
        String str1 = "1234";
        String str2 = "12345";
        if(str1.equals(str2)) {
            System.out.println("equal");
        } else {
            System.out.println("diferent");
        }
    }
    public static void main13(String[] args) {
        //输出n*n的乘法口诀表，n由用户输入。
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int i,j;
        for(i = n; i >= 1; i--) {
            for( j = 1; j <= n; j++) {
                if(i<=j) {
                    System.out.printf("%dx%d=%2d ",i,j,i*j);
                }
            }
            System.out.println();
        }
    }
    public static void main10(String[] args) {
        //倒序输出一个整数的每一位 如123 输出 3 2 1
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int tmp = n;
        while(tmp!=0) {
            System.out.printf("%d ",tmp%10);
            tmp/=10;
        }
    }

    public static void main9(String[] args) {
        //模拟登陆
        Scanner scanner = new Scanner(System.in);
        String code = "1234";
        int count = 3;
        while(scanner.hasNextLine()) {
            String n = scanner.nextLine();
            if(code.equals(n)) {
                System.out.println("登陆成功！");
                break;
            } else {
                System.out.println("密码错误，您还有"+(count-1)+"次机会，请重新输入：");
            }
            count--;
            if(count==0) {
                break;
            }
        }

    }
    public static void main8(String[] args) {
        //二进制序列 以int类型为例
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        for(int i = 31; i >= 0; i-=2) {
            System.out.printf("%d ",(n>>>i));
        }
        System.out.println();
        for(int i = 30; i >= 0; i-=2) {
            System.out.printf("%d ",(n>>>i));
        }

    }
    public static void main7(String[] args) {
        //二进制1的个数
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int count = 0;
        while(n!=0) {
            count++;
            n = n&(n-1);
        }
        System.out.println(count);
    }
    public static void main6(String[] args) {
        //求2个整数的最大公约数
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int min = a<b?a:b;
        while(min>1) {
            if(a%min==0 && b%min==0) {
                System.out.println(a+"和"+b+"的最大公约数是"+min);
                break;
            }
            min--;
        }
    }
    public static void main5(String[] args) {
        //计算分数的值
        double sum = 0.0;
        int flag = 1;
        for(int i = 1; i <= 100; i++) {
            sum += 1.0/(i*flag);
            flag = -flag;
        }
        System.out.println(sum);
    }
    public static void main4(String[] args) {
        //求出0~n之间所有的水仙花数
        Scanner scanner = new Scanner(System.in);
        for (int n = 1; n < 999999; n++) {

            //使用tmp来求出n的数字位数
            int tmp = n;
            int count = 0;
            while (tmp != 0) {
                count++;
                tmp /= 10;
            }
            //已求出n的位数

            //求和
            int sum = 0;
            tmp = n;
            while (tmp != 0) {
                sum += Math.pow(tmp % 10, count);
                tmp /= 10;
            }

            if (sum == n) {
                System.out.println(n);
            }
        }
    }
    public static void main3(String[] args) {
        //猜数字游戏
        Scanner scanner = new Scanner(System.in);
        Random random = new Random();

        int count = 8;
        int n = 0;

        while(count != 0) {

            int num = random.nextInt(100)+1;

            while(scanner.hasNext()) {

                n = scanner.nextInt();
                if(n > num) {
                    System.out.println("猜大了");
                } else if(n == num) {
                    System.out.println("猜对了");
                    break;
                } else {
                    System.out.println("猜小了");
                }
                count--;
                if(count == 0) {
                    break;
                }
            }
            if(count==0) {
                System.out.println("次数耗尽了，游戏结束");
            }
        }
    }
    public static void main2(String[] args) {
                Scanner in = new Scanner(System.in);
                int a = in.nextInt();
                int i = 0;
                int j = 0;
                for(i = 0; i < a; i++) {
                    for(j = 0; j < a; j++) {
                        if(i==j || (i+j)==(a-1)) {
                            System.out.print("*");
                        } else System.out.print(" ");
                    }
                    System.out.println();
                }
            }
    public static void main1(String[] args) {
        System.out.println("Hello world!");
    }
}